#Include <ScreenCapture.au3>
#Include <Function For Save As.au3>


AutoItSetOption("MustDeclareVars", 1)   ;Variables must be pre-declared.
Dim $logfilename = "Save As1"
Common_WriteCurrentFunctionNameToTempTXT($logfilename)

SaveAs1_1_1()
SaveAs1_1_2()
SaveAs1_1_3()
SaveAs1_2_3()
SaveAs2_1_1()
SaveAs2_1_2()
SaveAs2_1_3()
SaveAs2_1_4()
SaveAs2_1_5()
SaveAs2_1_6()
SaveAs2_1_7()
SaveAs2_1_8()
SaveAs2_1_9()
SaveAs2_1_10()
SaveAs2_1_13()
SaveAs2_1_27()
SaveAs2_1_28()
SaveAs2_1_29()
SaveAs2_1_30()
SaveAs2_1_31()
If Not $bPageViewType Then
	SaveAs2_1_35()
	SaveAs2_1_38()
	SaveAs2_1_39()
	SaveAs2_1_40()
	SaveAs2_1_45()
EndIf	
SaveAs2_1_41()
SaveAs2_1_52()
SaveAs2_1_54()

CloseOpenedExcel($oExcel) 

SaveAs_ImageSaveAs()

Func SaveAs1_1_1()
	Local $TestCaseID = "1.1.1"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	OpenMenu("File")
	Local $hMenu = WinGetHandle($sMenuCtrInfo)
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage,$hMenu)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)  
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs1_1_2()
	Local $TestCaseID = "1.1.2"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'AVI.avi', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)	
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(1)	
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenMenu("File")
	Local $hMenu = WinGetHandle($sMenuCtrInfo)
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage,$hMenu)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs1_1_3()
	Local $TestCaseID = "1.1.3"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'WAV.wav', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(1)	
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenMenu("File")
	Local $hMenu = WinGetHandle($sMenuCtrInfo)
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage,$hMenu)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs1_2_3()
	Local $TestCaseID = "1.2.3"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'DOC.doc', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(14)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Local $hDlg = WinGetHandle('')
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage,$hDlg)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Send('{ESC}')
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Send('{ESC}')
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_1()
	Local $TestCaseID = "2.1.1" 
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	ControlClick($CommonWindowCtrlInfro, "", 2)   ; Click cancel button.
	Common_SleepTime(1)			
	If WinGetHandle('Save "JPEG_Color.jpg" as') == '' Then	
		Send('{ESC}')
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Send('{ESC}')
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_2()
	Local $TestCaseID = "2.1.2" 
	$sCusMsg = 'You must typr a nmae'
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	SetSaveAsFileName("")
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage, WinGetHandle(''))
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Send('{ESC}')
		WinActivate($CommonWindowCtrlInfro)
		Send('{ESC}')
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Send('{ESC}')
	WinActivate($CommonWindowCtrlInfro)
	Send('{ESC}')
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_3()
	Local $TestCaseID = "2.1.3"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & "_-@#$%+=")
	Local $bCompareFile = Common_CompareFile($sTestResultPath & "_-@#$%+=" & '.jpg', $sCorrectResultPath & "_-@#$%+=" & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_4()
	Local $TestCaseID = "2.1.4"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	SetSaveAsFileName("/\*&?<>~")
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage, WinGetHandle(''))
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Send('{ESC}')
		WinActivate($CommonWindowCtrlInfro)
		Send('{ESC}')
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Send('{ESC}')
	WinActivate($CommonWindowCtrlInfro)
	Send('{ESC}')
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_5()
	Local $TestCaseID = "2.1.5" 
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	SetSaveAsFileName(" ")
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage, WinGetHandle(''))
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Send('{ESC}')
		WinActivate($CommonWindowCtrlInfro)
		Send('{ESC}')
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Send('{ESC}')
	WinActivate($CommonWindowCtrlInfro)
	Send('{ESC}')
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_6()
	Local $TestCaseID = "2.1.6"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & "Te   St")
	Local $bCompareFile = Common_CompareFile($sTestResultPath & "Te   St" & '.jpg', $sCorrectResultPath & "Te   St" & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_7()
	Local $TestCaseID = "2.1.7" 
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & $TestCaseID & "  ")
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_8()
	Local $TestCaseID = "2.1.8"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	SetSaveAsFileName("55555555555555555sss111111111111111sssssssssssssssssssssssssssssssdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsssssssssssssssssssssssssssssssssss2ssssssssssssssssdddddddddddddddddddd")
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage, WinGetHandle(''))
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Send('{ESC}')
		WinActivate($CommonWindowCtrlInfro)
		Send('{ESC}')
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Send('{ESC}')
	WinActivate($CommonWindowCtrlInfro)
	Send('{ESC}')
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_9()
	Local $TestCaseID = "2.1.9"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & "77666666666666665555555555555544444444444333333333333333222222222222sss111111111111111ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss")
	Local $bCompareFile = Common_CompareFile($sTestResultPath & "77666666666666665555555555555544444444444333333333333333222222222222sss111111111111111ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" & '.jpg', $sCorrectResultPath & "77666666666666665555555555555544444444444333333333333333222222222222sss111111111111111ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_10()
	Local $TestCaseID = "2.1.10"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sSampleFolderPath & 'JPEG_Color')
	Common_ScreenCaprureWindow($sTestResultPath,$sCaptureImage, WinGetHandle(''))
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $sCaptureImage, $sCorrectResultPath & $sCaptureImage)  			
	If $bCompareFile Then	
		Send('{ESC}')
		WinActivate($CommonWindowCtrlInfro)
		Send('{ESC}')
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Send('{ESC}')
	WinActivate($CommonWindowCtrlInfro)
	Send('{ESC}')
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_13()
	Local $TestCaseID = "2.1.13"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	ControlClick($hPMHandle,"",$sSaveAsButtonInToolbarCtrInfo)
	Common_SleepTime(4)	
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_27()
	Local $TestCaseID = "2.1.27"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgByCtrlS()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_28()
	Local $TestCaseID = "2.1.28"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgByCtrlS()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	JPGcompression('COMPRESSION')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_29()
	Local $TestCaseID = "2.1.29" 
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgByCtrlS()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	JPGcompression('QUALITY')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_30()
	Local $TestCaseID = "2.1.30"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'DOC.doc', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(27)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "right") 
	OpenSaveAsDlgFromContextMenu()
	WinWaitActive($CommonWindowCtrlInfro, '', 5)
	WinActivate($CommonWindowCtrlInfro)	
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_31()
	Local $TestCaseID = "2.1.31"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	ControlClick($hPMHandle, "", $sSwicthToListViewButtonCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_35()
	Local $TestCaseID = "2.1.35" 
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	ControlClick($hPMHandle, "", $sPageViewCtrInfo)
	Common_SleepTime(6)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_38()
	Local $TestCaseID = "2.1.38"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	ControlClick($hPMHandle, "", $sPageViewCtrInfo)
	Common_SleepTime(6)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	ControlClick($hPMHandle, "", $sPageViewButtonInToolbarCtrInfo)
	Common_SleepTime(10)	
	If $bPageViewType = 1 Then
		If Not Common_AddTextAnnotation() Then
			Common_WriteLog($sFaile & $sFailLogMsg , $TestCaseID,$sBackupRestoreFunctionName,$bReproduceTestCase)
			Common_Close_PM($hPMHandle) 
			Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Return 0
		EndIf
	Else
		SetStampAnnotation()
		Common_SleepTime(2)
		ControlClick($hPMHandle, "", $sSwicthToThumbnailViewButtonCtrInfo)
		Common_SleepTime(1)	
		Send('{ENTER}')
		Common_SleepTime(3)	
	EndIf
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "right")
	OpenSaveAsDlgFromContextMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SaveAnnotationOptionForSaveAs("Save to All AP")	
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_39()
	Local $TestCaseID = "2.1.39"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	ControlClick($hPMHandle, "", $sPageViewCtrInfo)
	Common_SleepTime(6)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	ControlClick($hPMHandle, "", $sPageViewButtonInToolbarCtrInfo)
	Common_SleepTime(10)	
	If $bPageViewType = 1 Then
		If Not Common_AddTextAnnotation() Then
			Common_WriteLog($sFaile & $sFailLogMsg , $TestCaseID,$sBackupRestoreFunctionName,$bReproduceTestCase)
			Common_Close_PM($hPMHandle) 
			Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Return 0
		EndIf
	Else
		SetStampAnnotation()
		Common_SleepTime(2)
		ControlClick($hPMHandle, "", $sSwicthToThumbnailViewButtonCtrInfo)
		Common_SleepTime(1)	
		Send('{ENTER}')
		Common_SleepTime(3)	
	EndIf
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "right")
	OpenSaveAsDlgFromContextMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SaveAnnotationOptionForSaveAs("Save to PM")	
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_40()
	Local $TestCaseID = "2.1.40"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	ControlClick($hPMHandle, "", $sPageViewCtrInfo)
	Common_SleepTime(6)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	ControlClick($hPMHandle, "", $sPageViewButtonInToolbarCtrInfo)
	Common_SleepTime(10)	
	If $bPageViewType = 1 Then
		If Not Common_AddTextAnnotation() Then
			Common_WriteLog($sFaile & $sFailLogMsg , $TestCaseID,$sBackupRestoreFunctionName,$bReproduceTestCase)
			Common_Close_PM($hPMHandle) 
			Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Return 0
		EndIf
	Else
		SetStampAnnotation()
		Common_SleepTime(2)
		ControlClick($hPMHandle, "", $sSwicthToThumbnailViewButtonCtrInfo)
		Common_SleepTime(1)	
		Send('{ENTER}')
		Common_SleepTime(3)	
	EndIf
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "right")
	OpenSaveAsDlgFromContextMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SaveAnnotationOptionForSaveAs("Not Save Annotation")	
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_41()
	Local $TestCaseID = "2.1.41"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & 'JPEG_Color.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	ControlClick($hPMHandle, "", $sTileButtonInToolBarCtrlInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath & $TestCaseID)
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_45()
	Local $TestCaseID = "2.1.45" 
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	FileCopy($sSampleFolderPath & '1.jpg', $sFunctionFolderPath, 1)
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(1)	
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	ControlClick($hPMHandle, "", $sOCRButtonInToolbarCtrInfo)
	Common_SleepTime(35)	
	If $bPageViewType = 1 Then
		Send("!f")
		Common_SleepTime(1)	
		Send("s")
	Else
		WinActivate($hPMHandle)
		ControlClick($hPMHandle, "", $sSaveAsButtonInToolbarCtrInfo)
	EndIf
	Common_SleepTime(18)
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	If $bPageViewType = 1 Then
		SetSaveAsFileNameInPageView($sTestResultPath & $TestCaseID)
	Else
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
	EndIf
	Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & '.jpg', $sCorrectResultPath & $TestCaseID & '.jpg')		
	If $bCompareFile Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_52()
	Local $TestCaseID = "2.1.52" 
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	For $i =1 to 3 
		FileCopy($sSampleFolderPath & $i &'.jpg', $sFunctionFolderPath, 1)
	Next
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	ControlListView($hPMHandle, "", $sThumbnailViewCtrInfo, "Select" ,1, 2)    
	Common_SleepTime(1)	
	ControlClick($hPMHandle, "", $sStackButtonInToolbarCtrInfo)
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SleepTime(3)	
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath &$TestCaseID & '_1')
	Common_SleepTime(5)	
	SetSaveAsFileName($sTestResultPath &$TestCaseID & '_2')
	Common_SleepTime(5)	
	SetSaveAsFileName($sTestResultPath &$TestCaseID & '_3')
	Common_SleepTime(5)	
	Local $bCompareFile_1 = Common_CompareFile($sTestResultPath & $TestCaseID & '_1.jpg', $sCorrectResultPath & $TestCaseID & '_1.jpg')  
	Local $bCompareFile_2 = Common_CompareFile($sTestResultPath & $TestCaseID & '_2.jpg', $sCorrectResultPath & $TestCaseID & '_2.jpg') 
	Local $bCompareFile_3 = Common_CompareFile($sTestResultPath & $TestCaseID & '_3.jpg', $sCorrectResultPath & $TestCaseID & '_3.jpg') 
	If $bCompareFile_1 And $bCompareFile_2 And $bCompareFile_3 Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs2_1_54()
	Local $TestCaseID = "2.1.54"
	$sCusMsg = ''
	$sFailLogMsg = Common_GetTestStepInSTD($sExcelSheetName,$iCurrentSheetTotalLineNumber,$TestCaseID, $iRescolumn, $sCusMsg)
	Local $bReproduceTestCase = Common_ReproduceRunWithIni($SaveAsFunctionName,$TestCaseID)
	If $bReproduceTestCase = False Then
		Return 3   
	EndIf	
	Local $sTestCaseLevel = Common_GetTestCaseLevel($oExcel, $TestCaseID,$SaveAsFunctionName,$iCurrentSheetTotalLineNumber)   
	Local $bExecuteTestCase = Common_IsTestCaseLevelQualified($sTestCaseLevel)
	If $bExecuteTestCase = False Then
		Return 2   
	EndIf 
	Local $sCaptureImage = $TestCaseID & '.jpg'  
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	For $i =1 to 3 
		FileCopy($sSampleFolderPath & $i &'.jpg', $sFunctionFolderPath, 1)
	Next
	Local $hPMHandle = Common_Run_PageManager_Ex($TestCaseID, $sTreeViewFunctionName)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	Common_SleepTime(2)	
	WinActivate($hPMHandle)
	_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
	Common_SleepTime(1)	
	ControlListView($hPMHandle, "", $sThumbnailViewCtrInfo, "Select" ,1, 2)    
	Common_SleepTime(1)	
	OpenSaveAsDlgFromFileMenu()
	Common_SleepTime(3)	
	Common_SetSaveAsFormat('JPEG(*.JPG)')
	SetSaveAsFileName($sTestResultPath &$TestCaseID & '_1')
	Common_SleepTime(5)	
	SetSaveAsFileName($sTestResultPath &$TestCaseID & '_2')
	Common_SleepTime(5)	
	SetSaveAsFileName($sTestResultPath &$TestCaseID & '_3')
	Common_SleepTime(5)	
	Local $bCompareFile_1 = Common_CompareFile($sTestResultPath & $TestCaseID & '_1.jpg', $sCorrectResultPath & $TestCaseID & '_1.jpg')  
	Local $bCompareFile_2 = Common_CompareFile($sTestResultPath & $TestCaseID & '_2.jpg', $sCorrectResultPath & $TestCaseID & '_2.jpg') 
	Local $bCompareFile_3 = Common_CompareFile($sTestResultPath & $TestCaseID & '_3.jpg', $sCorrectResultPath & $TestCaseID & '_3.jpg') 
	If $bCompareFile_1 And $bCompareFile_2 And $bCompareFile_3 Then	
		Common_WriteLog($sPass, $TestCaseID,$logfilename,$bReproduceTestCase)  
		Common_Close_PM($hPMHandle) 
		Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
		Return 1   
	EndIf
	Common_WriteLog($sFaile & $sFailLogMsg ,$TestCaseID,$logfilename,$bReproduceTestCase)   
	Common_Close_PM($hPMHandle) 
	Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
	Return 0
EndFunc

Func SaveAs_ImageSaveAs()
	Common_Del_DB() 
	Common_InitializeStatus()   
	InitializeStatusForSaveAs()  
	Local $sPMTitle = Common_Run_PageManager() 
	Local $hPMHandle =  WinGetHandle($sPMTitle)
	ControlClick($hPMHandle, '', $sSwicthToListViewButtonCtrInfo)
	Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Local $hThumbnailView = ControlGetHandle($hPMHandle, "", $sThumbnailViewCtrInfo)
	For $i = 0 to 16
		Local $TestCaseID = "ColorJPEGTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'JPEG_Color.jpg', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'JPEG_Color.jpg')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next	
	
	For $i = 0 to 16
		Local $TestCaseID = "Gray_TIFFTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'Gray_TIFF.tif', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'Gray_TIFF.tif')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "BMP_BWTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'BMP_BW.bmp', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'BMP_BW.bmp')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "TIFFMultipageTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'Multi_page.tif', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'Multi_page.tif')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "TIFF_8BitTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'TIFF_8Bit.tif', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'TIFF_8Bit.tif')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "TIFF_16BitTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'TIFF_16Bit.tif', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'TIFF_16Bit.tif')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "JPEG_CMYKTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'JPEG_CMYK.jpg', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'JPEG_CMYK.jpg')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "JPEG_YCCKTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'JPEG_YCCK.jpg', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'JPEG_YCCK.jpg')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "BMP_16BitTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'BMP_16Bit.bmp', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'BMP_16Bit.bmp')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "BMP_24BitTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'BMP_24Bit.BMP', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'BMP_24Bit.BMP')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	
	For $i = 0 to 16
		Local $TestCaseID = "BMP_32BitTo" & $Saveto_1[$i]
		FileCopy($sSampleFolderPath &'BMP_32Bit.bmp', $sFunctionFolderPath, 1)
		Common_SleepTime(2)	
		Send('{F5}')
		Common_SleepTime(4)	
		WinActivate($hPMHandle)
		SelectOneFileInListiew()
		;_GUICtrlListView_ClickItem($hThumbnailView, 0, "left") 
		Common_SleepTime(1)	
		OpenSaveAsDlgFromFileMenu()
		Common_SetSaveAsFormat($SaveFormat_1[$i])
		SetSaveAsFileName($sTestResultPath & $TestCaseID)
		If $FileFormat_1[$i] == ".htm" Or $FileFormat_1[$i] == ".psd" Or $FileFormat_1[$i] == ".png" Then
			If FileExists($sTestResultPath & $TestCaseID & $FileFormat_1[$i]) Then
				Common_WriteLog($sPass, $TestCaseID,$logfilename, '')  
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)		
			EndIf				
		Else
			Local $bCompareFile = Common_CompareFile($sTestResultPath & $TestCaseID & $FileFormat_1[$i], $sCorrectResultPath & $TestCaseID & $FileFormat_1[$i])		
			Common_SleepTime(15)
			If $bCompareFile Then	
				Common_WriteLog($sPass, $TestCaseID,$logfilename,'')  
				Common_WiteTestCaseExecuteRecode($sTempTXTPath,$TestCaseID)
			Else
				Common_WriteLog($sFaile & $sErrorFunction ,$TestCaseID,$logfilename,'')   
			EndIf
		EndIf
		FileDelete($sFunctionFolderPath & 'BMP_32Bit.bmp')	
		Common_SwitchToFolderInRootDiskC($hPMHandle,$SaveAsFunctionName)
	Next
	Common_Close_PM($hPMHandle)	 
EndFunc
